package ch4;

/**
 * @author ANG.YU
 * @date 2020-08-09 13:39
 */
public class Leaf {
    private int i = 0;

    public static void main(String[] args) {
        Leaf l = new Leaf();
        l.incr().incr().incr().print();

    }

    Leaf incr() {
        i++;
        return this;
    }

    void print() {
        System.out.println("i= " + i);
    }
}
